package thinkingJava.chapter10;

public class TestParcel {

}
class Parcel4 {
	private class PContents implements Contents {
		private int i = 11;
		public int value() {
			return i;
		}
	}
	protected class PDestination implements Destination {
		private String label;
		PDestination(String whereTo) {
			this.label = whereTo;
		}
		public String readLabel() {
			return label;
		}
	}
	public Contents contents () {
		return new PContents();
	}
	public Destination destination(String s) {
		return new PDestination(s);
	}
	public static void main(String[] args) {
		Parcel4 p4 = new Parcel4();
		Contents c = p4.contents();
		Destination d = p4.destination("TsingHua");
	}
}